package com.javatest.springboot2ratelimit.controller;

import com.javatest.springboot2ratelimit.annoation.MakeRateLimit;
import com.javatest.springboot2ratelimit.enums.RateLimitFineness;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @create 2020-07-21 下午3:13
 */
@RestController
public class TestController {

    @MakeRateLimit(limitPeriod = 5, limitCount = 1, limitFineness = RateLimitFineness.IP)
    @GetMapping("/test")
    public String test() {
        return "test message";
    }
}
